#ifndef __LIST_H_
#define __LIST_H_

#include <stdint.h>

#define list_entry(ptr, type, member) ((type *)((char *)(ptr)-(unsigned long)(&((type *)0)->member))) 


#define for_each(n,l) for(n = l;n!=NULL;n= n->next)

#define list_insert(node,new) do {  \
    node->next = new;   \
    node =new;  \
}while(0)

#endif